package jmine.tec.persist.schema.api;

/**
 * @author lee
 * @param <T> tipo de elemento processado pelo elemento
 */
public abstract class AbstractProcessingSchemaElement<T> implements ProcessingSchemaElement<T> {

    private final ProcessingSchemaElement<?> parent;

    /**
     * @param parent mensagens do warning
     */
    public AbstractProcessingSchemaElement(ProcessingSchemaElement<?> parent) {
        this.parent = parent;
    }

    /**
     * {@inheritDoc}
     */
    public void warn(String warning) {
        this.parent.warn(warning);
    }

    /**
     * Obtém o parent do elemento
     * 
     * @return parent
     */
    protected ProcessingSchemaElement<?> getParent() {
        return this.parent;
    }
}
